package com.bwie.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.bwie.mapper.CityMapper;
import com.bwie.pojo.TbCity;
import com.bwie.service.CityService;
import com.bwie.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @program: day0617mounth
 * @ClassName CityServiceImpl
 * @description:
 * @author: 段阳
 * @create: 2024-06-17 10:16
 **/
@Service
@Transactional
public class CityServiceImpl implements CityService {

    @Autowired
    private CityMapper cityMapper;

    @Override
    public R findCityList(Integer pid) {
        List<TbCity> tbCities = cityMapper.selectList(new QueryWrapper<TbCity>().lambda().eq(TbCity::getPid, pid));
        return R.success("",tbCities);
    }
}